<?php
declare (strict_types=1);

namespace app\admin\validate;

use think\Validate;

class Category extends Validate
{
    protected $rule = [
        'title'  => 'require',
        'status' => ['require', 'in' => '1,2'],
    ];

    protected $message = [
        'title.require' => '请输入栏目名称',
        'status'        => '请选择正确的状态',
    ];

    protected $scene = [
        'add'  => ['title', 'status'],
        'edit' => ['title', 'status']
    ];
}
